package com.wys.ws_im.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author wys
 * created in 4:32 2019/5/1
 */
@Slf4j
@RestController
public class Login {


    @GetMapping("lgn")
    public void lgn(Integer uid, String password, HttpServletRequest request) {

        HttpSession sessoin = request.getSession();
//        TokenVO tokenVO = userService.login(account, password);
//        sessoin.setAttribute(tokenVO.getUid().toString(), tokenVO.getUid().toString());
        log.info("sdsf");
        sessoin.setAttribute(uid.toString(), uid.toString());
        System.out.println(sessoin.getId());
//        return "登录成功";

    }
}
